package ink.carnation.imtalk.mapper;

import ink.carnation.imtalk.model.po.FriendPo;
import ink.carnation.imtalk.model.po.UserPo;
import ink.carnation.imtalk.model.vo.FriendVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author flbu920
 * @Date 2020/9/20 16:03
 * @Version 1.0
 */
@Mapper
public interface FriendMapper extends tk.mybatis.mapper.common.Mapper<FriendPo> {
    List<UserPo> selectByNickName(@Param("nickName") String nickName, @Param("userId") Integer userId);

    UserPo selectByUserIdAndFriendId(@Param("userId") Integer userId, @Param("friendId") Integer friendId);

    int updateAddConfrimFriend(@Param("userId") Integer userId, @Param("friendId") Integer friendId);

    List<FriendVO> getFriendListByUserId(@Param("userId")Integer userId);
}
